fix(apt): gh-pages 不再存储 .deb,Packages 指向 GitHub Releases - #82
Merged
Conversation
…eases 每次 release 都往 gh-pages 的 debian/pool/ 提交 .deb blob(~3.5MB x 2), 累积导致 clone 越来越慢(已 34MB 历史 blob)。 改为:Packages 索引的 Filename 字段直接写 GitHub Releases 下载 URL, apt 客户端从该 URL 拉 .deb,完全不经过 gh-pages。 gh-pages 只保留文本索引文件(Packages.gz / Release,几 KB)。 同时用 git-filter-repo 清理了 gh-pages 历史中已积累的 debian/pool/ 下的所有 .deb blob。
Owner
Author
|
审查完成,未发现需要阻塞合并的问题。
建议在下次正式 release 后补跑一次 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
每次 release 的 "Build and deploy APT Repository" 步骤把
.deb(amd64 + arm64,各 3-4MB)cp到gh-pages的debian/pool/,然后 commit + push。由于每次版本号不同,旧版本不会被覆盖——成为新的 git blob 永久留在历史中。实测:gh-pages 历史中
.debblob 总和 34MB(8 个独立 blob),导致 clone 很慢。Fix
1.
scripts/build-apt-repo.sh— 不再 copy .deb 到 pool/Packages索引的Filename:字段直接写 GitHub Releases 下载 URL:https://github.com/<repo>/releases/download/v<ver>/bash-agent_<ver>_<arch>.deb.deb,完全不经过 gh-pagesPackages.gz/Release,几 KB)pool/目录,不再cp.deb2. gh-pages 历史清理(已执行)
git filter-repo从 gh-pages 历史中删除debian/pool/下所有.debblobTest plan
build-apt-repo.sh:Filename正确指向 Releases URL,pool/不存在,Packages/Release正常生成git ls-tree -r origin/gh-pages无.deb/pool条目